import { defineStore } from 'pinia';

import { cranes } from './objects/crane';
import { parkings } from './objects/parking';
import { stocks } from './objects/stock';
import { rollers } from './objects/roller';
import { safetyGates } from './objects/safetyGate';
import { grindingMachines } from './objects/grindingMachine';

import { Dimension } from './model/dimension';

export const useYardStore = defineStore('yard', {
  state: () => ({
    title: '新余1580智能板坯成品库',
    bayIds: ['A', 'B', 'C'],
    craneIds: ['01', '02', '03', '04', '05', '06'],
    yardDimension: { width: 204000, height: 90000 } as Dimension,
    bayDimension: {
      A: { width: 204000, height: 30000 },
      B: { width: 204000, height: 30000 },
      C: { width: 204000, height: 30000 },
    } as Record<string, Dimension>,
    origin: {
      xOrigin: 'left',
      yOrigin: 'top',
    },
    alarmIsshow: true,
    rightPart: [
      {
        name: 'WorkerInfo',
        isShow: true,
      },
      {
        name: 'AutoMation',
        isShow: true,
      },
      {
        name: 'WorkReport',
        isShow: true,
      },
      {
        name: 'EquipmentStatus',
        isShow: true,
      },
    ],
    cranes,
    parkings,
    stocks,
    rollers,
    safetyGates,
    grindingMachines,
  }),
  getters: {},
  actions: {},
});
